package com.lglbc.protype.deep;

import com.lglbc.protype.deep.Student;
import com.lglbc.protype.deep.Teacher;
/**
 * @author： 乐哥聊编程(全平台同号)
 */
public class Test {
    public static void main(String[] args) {
        Student student = new Student("a", "b", "c");
        student.setTeacher(new Teacher("张老师"));
        System.out.println(student.toString());
        Student cloneStudent = student.clone();
        System.out.println(student.toString());
        System.out.println(cloneStudent == student);
        cloneStudent.getTeacher().setName("杨老师");

        System.out.println(student.toString());

    }
}
